<?php

namespace common\models\ar;

use Yii;

/**
 * This is the model class for table "user_money_changerecord".
 *
 * @property string $id
 * @property string $userID 外键,用户id
 * @property string $changeMoney 用户资金变动额,增加为正数,减少为负数
 * @property string $changeDesc
 * @property string $changeTime 资金变更时间
 * @property string $type 1入金2出金3扣手续费4平仓盈亏11入优先12出优先
 * @property int $tradeId 资金变更对应的交易Id,手续费和盈亏时有效
<<<<<<< HEAD
 * @property string $preTotalMoeny 变更前总资金结余
 * @property string $preequip 变更前配资额度
=======
 * @property string $preTotalMoney
 * @property string $preequip
>>>>>>> 3984e3d576f670740b0f209e8d87928bea6c572c
 */
class UserMoneyChangerecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_money_changerecord';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['userID', 'changeDesc'], 'required'],
            [['userID', 'type', 'tradeId'], 'integer'],
            [['changeMoney', 'preTotalMoeny', 'preequip'], 'number'],
            [['changeMoney', 'preTotalMoney', 'preequip'], 'number'],
            [['changeTime'], 'safe'],
            [['changeDesc'], 'string', 'max' => 300],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'userID' => 'User ID',
            'changeMoney' => 'Change Money',
            'changeDesc' => 'Change Desc',
            'changeTime' => 'Change Time',
            'type' => 'Type',
            'tradeId' => 'Trade ID',
            'preTotalMoeny' => 'Pre Total Moeny',
            'preTotalMoney' => 'Pre Total Money',
            'preequip' => 'Preequip',
        ];
    }
}
